package com.lh.io.bio;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ExecutorService {

    private Executor executor = new ThreadPoolExecutor(
            2,
            10,
            2,
            TimeUnit.SECONDS,
            new ArrayBlockingQueue<Runnable>(10)
    );

    public Executor getExecutor() {
        return executor;
    }

    public void setExecutor(Executor executor) {
        this.executor = executor;
    }
}
